<?php

require_once(DIR_LIB."VsCore".DIR_SEP."vsauth.php");

require_once(DIR_LIB."VsGui".DIR_SEP."vsmenu.php");

class XCartVerticalMenu extends VsMenu {

	private $_auth = NULL;

	function __construct() {
		parent::__construct();

		$this->_wwwDir = 'templates/XCart/';
		$this->assign('wwwDir', $this->_wwwDir);
		$this->_template = dirname(__FILE__).DIR_SEP."xcart_menu.html";

		$this->_auth = VsAuth::Instance();

		$this->init();
	}
	//==========================================================================

	function show() {
		$this->assign('menuTitle', 'Основно Меню');

		return parent::show();
	}
	//==========================================================================

	private function init() {
		//$this->addItem(new VsMenuItem('Home', 'home.php'));
		$this->addItem(new VsMenuItem('Групи Оператори', 'operators_groups.php'));
		$this->addItem(new VsMenuItem('Оператори', 'operators.php'));
		$this->addItem(new VsMenuItem('Модели', 'models.php'));
		$this->addSeparator();

		//$this->addItem(new VsMenuItem('Заработка Оператори', 'operators_work.php'));
		//$this->addSeparator();

		$this->addItem(new VsMenuItem('Потребители', 'admin_users.php'));
		$this->addItem(new VsMenuItem('Настройки', 'settings.php'));
		$this->addSeparator();

		if($this->_auth->level()==9) {
			
		}

		$this->addItem(new VsMenuItem('Изход', $_SERVER['PHP_SELF']."?act=logout"));
	}
	//==========================================================================

};

?>
